package gui.gestion.tableModel;

import javax.swing.table.AbstractTableModel;

import logica.Controlador;

public abstract class TableModelGestion extends AbstractTableModel{
	
	private static final long serialVersionUID = 1L;

	protected String[] columnNames;
	protected Object[][] data={};
	
	protected Controlador controlador;
	
	public TableModelGestion(Controlador controlador){
		this.controlador=controlador;
		columnNames=null;
	}
	
	
	@Override
	public int getColumnCount() {
		return columnNames.length;
	}

	@Override
	public int getRowCount() {
		return data.length;
	}
	
	@Override
	public String getColumnName(int col) {
		return columnNames[col];
	}
	
	@Override
	public Object getValueAt(int rowIndex, int columnIndex) {
		return data[rowIndex][columnIndex];
	}

	public abstract void updateData();
		
}	
